package operation;

import book.Book;
import book.BookList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: happyiu
 * Date: 2021-11-27
 * Time: 23:37
 */
public class DisplayOperation implements IOperation {

    /**
     * 打印图书列表
     * @param bookList
     */

        public void work(BookList bookList) {
            System.out.println("打印图书！");
            int size = bookList.getUsedSize();
            for (int i = 0; i < size; i++) {
                Book book = bookList.getPos(i);//bookList[i]
                System.out.println(book);
            }
        }
}
